Approach 2 - event-driven approach