use cache to improve performance