add some comments, fixed bugs with baqi