This is my final version of the Query 1 homework, enjoy!