Added wrapping function. Currently does not work.