After the original z axis endstop broke I made a few changes to the file.It can now be snapped onto the metal rod.I also added a hole for an on/off switch.