fixed couple issues and reformatted