added if-else expression