Lambdas will help you in this part, instead of a static variable, you will access a lambda with a context that holds "this"