by determining temperatures inside the cylinder