implemented caching and added a button