add proc environment to check `call` statement