use of braces in the if statements
space trimming