removed length attribute from ArrayList