refactoring click logic out of ply into ply L3