added test for zero-length input