Removed code for rewrite