removed "expr" variable in check()