added len check.