clean up and simplify raise_on_click