added a bit of interface
make cache
state refresh
full refresh tested
pdf use state
not finished, does not compile