edited fixed query 4, need to check within query