added tan's queries