basic rewrite, might not work but shoud