refactor click logging 2