removed group by because it was taking too long