working on buggy plan c solver