removing unused if