This pull request relies on updated wrap function implementation. What do you suggest instead?