changed script into objects and methods. temp page shows progress