added clicking function