added memoization and recursive descent to contains_ analyses