lines (49, 50) and (60, 61) are exactly the same, should be moved out of the if-statement scope