remove unnecessary check and make the remaining check much better