fixing bugs
use struct
add demo