add names to query