Added motor function