improved compilation step, untested