cleaner approach and some debugging around empty events