move moment out of the global scope