fixed momentum bug for p > 0. testing in progress