implement rebind