added compile() method to Prog