trying more efficient way to append final data