fixed proble with groupby