added memoization in utils and used it in 'exclude' module