Implement traverseCode