fixed type typos
added documentation