changed global reference to "this"