don't use getter for length, set it on realloc
set the whole prototype at once for cleaner code