fixed code
updated documentation