New compile method is used by main program