using events for opening and closing the lists, to which users can attach listeners