fixed, and added 'use strict' and /*global moment*/