fix some bug and add some method