refactor animation speed code and tweak animation speed