finished length() for arrays. updated test