bot rewrite stuff