added api wrapper for events