add a seemingly working version of the 'plan c' solver