better callback handling for emits, z-ordering