iteration B1: validation + correcting functional tests
iteration B2: unit tests + adding length validation