added caching
Merge pull request #79 from christophwong/prettify

added caching