support for events instead of polling