Remove redundancy in control statement