remove unused if statement