adding rudimentary caching