achieved massive performance increase through block memoization