added compile method