fixed a problem with switching the valves

changed event "mouse down" to "mouse down?"; adjusted timeout value of
event structure, removed wait in while loop around even structure