added formatter
re-implemented dao