added the ability to guess the motor offset, seems to work