cache test updates
assignCacheByFun (untested)
formatting