added wrap() and wrapf() functions and documentation updates