refactored calling of moment