Fixed query bug & added queries