Passing event to all functions