check character length