compacted the array object