Follow coding style:
1. brackets and if/else must be on one line ( "} else if {" )
2. use spaces around operators