recursive resolve