emit events instead of callbacks