fix some bugs, add tutorial