add recursive solving