implemented first try at automatic localStorage cache