updated query 1 and 3

qeury 3 not tested, but no errors