code formatting, fix if/else to my liking