code style: fix indentation issue in if conditionals
code style: always use curly brackets for if/else blocks
code style: space after if