Added optional length
Merge pull request #2 from stou/master

Added optional length