adjusted tests to account for length zero corner cases