Added motor functions and consumption function