removed trailing spaces for cleanliness, and fixed if statement syntax error