Replace self writed group_by by Enumerable.