Tweaked the displacement function