add group to result
optimize tags result