preheating Function