implements LZ (tested) (closes #26)