refactored to use underscore templating
fixed date formatting bug