Added cache to improve performance