adding events to navbar