upgraded to work with motor 0.1