modified the computation of force & some constraints