correct/test unwrap and related functions