I restructured the if statement logic in e9779e65ad73e2971b9550be0bcdff4a75618356