upright motor testing code