working recursiveE