date creation complete, refactoring