add functions for cache