refactored formatting a bit