New function created for length control
Merge remote-tracking branch 'origin/master'