replaced inline query with field.