modified main js with custom progress animation method