get rid of match, since for won't execute anyway if length < 0