added view function handling blockchain callback