remove click listener from loop to prevent multiple events from being attached