change callback from static to non static