sub functions reference object vars with this.var