please fix your indents and use braces if your ifs are multi-line