added view function for group api