refactored formatting into something sane