solver working
testcases
adapt solver to api