removed redundant checks for num, str lengths