documentation and junit tests