rewrite ui