try to make the queries simpler as the number of rows was collosal