changed to use moment objects