this is a copy and paste + find and replace from lru-map :)