search function -> async (incomplete)