rebuilt display func using moment.js