finish dynamic array