changed input to use len instead of hard coded value.