move click cooldown to function