finished correcting parameter leeway bug