Added Endstop functions