assigning events to text labels as well