[fix] bugs, and add samples .