implemented d-ary cuckoo. not optimized yet.