added lazy sequences and array restructuring