modify validate() to this.validate()