An image forming apparatus can detect a leading edge and a width of a recording medium with a simple structure so as to prevent erroneous recording. In one embodiment, a plurality of electrodes supported by a semiconductor substrate are brought into proximity with a reaction medium comprising a sample suspected of containing the target molecule. An attachment portion extends from the central portion which is affixed between the cylinder head and the intake manifold ports. A weighted average of scores based on matched master profiles provides useful product demand information.