Delete code of using if-clauses. Using the simple one instead