added a test for the length of the array suggested by davido