v.2.0 - introducing pattern caching