recursive solver built