refactored kojac_ember