midpoint displacement stuff