add docs and move out formatter