fixed some syntax errors and updated doc