correcting update of passed length
added test function
Merge branch 'master' of github.com:loghina/GoogleChallenge