lab 8

the query was a pain