compile method outputing correct data