modified view_group. broken table printing into functions