improve performance allocating right ArrayList