implemented date saving - discovered moment js for date formatting