fix samples, and close issue #6.