Added support for multiple motors (untested)