add caching and threads to marc record codes