add frees of the dinamycally allocated arrays