improve performance by caching goals