renmove unused if statement