modified the displacement calculation