avoid arraycopy by presizing arrays correctly