fixed formatting and unneceessary code