primal IP method working on test example
minor changes