change singleton to caching and integrity