implemented method wrap()