new compilation method