remove unnecessary "if"