delete unused if-statement