refactored processCallTree