This if condition is the same one as above, in line 119. No need to have separate checks. Combine them