utils for events and visibility