fixed type errors
updated the doc