fixes and reformatting