Fan speed logic added