add reference to moment so it's not called in global scope