improved friends retrieval