date fcn working. added back mongodb env variable