both the if() can be clubbed as a single expression.