simplified/faster version.  still 2D.