updated the files to use the new and improved wrap function from the api