add note on pre-allocating arrays