fixed the looping error, fussed with whitespace