add date formatter + refactor