replaced prev pointer with having map_find returning the prev pointer as well. all search now stops as soon as nodekey >= key