transition to mongodb almost complete. Added hourly record support too.