replace this.context with local var