Oh, and this should probably be a named function of the class, rather than anonymously defined