fixed indentation and deleted unneeded code