add cache for common elements