refactor and sugar dates