rewrite adb