remove needless if check