compute primal step