rearranging
bugfix
more reformatting
reformatting complete, for now