rewrite GUI