added search in-memory option