add watch task
fix some bugs