refactored common code out of probe and into mouseButtonTool so it can be used with similar tools