remove unnecessary if statement