fix some bug. add new 'features'