Added 2D sampling