Simplified the recursive resolver