added inline if expressions
added if-statement