search function split into three, libdhash used instead of libglib