repair implementation
prepare for cache