Tweaked the function a little.