a pan is used to cook