first attempt at an OO version
update cache (incomplete)