add examples folder and some bug fix