added function 'unwrap2'