cleaning up the array