Improving compile method