initial non-working version of 'plan c' solver