external query moved to external api