using cache for better performance/for prototypes too