fixed #41 and doc fixes