change cache to hashtbl-based