caching still not quite right but mostly working