Track current length as an instance variable