rewriting jdb