first working version of the wrapper