more work on moteswrapper