added view function