refactor main; add level 2 compiler fail case