implemented motor, kinda
some minor fixes