remove needless context check and variable