fixing the formatting more efficiently