added wrap() function method