some small changes, and error fixed