making cache and class structures