Removing unnecessary if statement