event-based API for greater clarity