implement support for rewire