Working version... bit ugly, but the grid shapes are weird...