added test for length