simplified the API so that it consistently uses events