date handling and json encoding
date tests and test reorg