final version
Added documentation