MOD WIP REFACTOR retire the adhoc errors - use kriterium

NOT FULLY TESTED