In an air motor cylinder the compressed air has an internal energy of 450 kJ/kg at the beginning of the expansion and an internal energy of 220 kJ/kg after expansion. If the work done by the air during the expansion is 120 kJ/kg, calculate the heat flow to and from the cylinder.