equalising array lengths