Adding innerclass to provide simple callback implementation