improve coding style : correct syntax with if-then-else statements
wrap long lines