wip, started implementing the sample cache idea