adds formatters, some refactoring