This shows M1 decoder installed in front of motor.  The decoder is held in place with a dab of glue between the decoder and the loco circuit board. Decoder leads are connected as follows: Red = 8, Orange = 1, Yellow = 2, Black = 4, Grey = 5, White = 6, Blue = 7. Decoder should face up as shown in picture with yellow, orange, black, red wires showing on top.