Added a comment and some caching