added resize array method