rewrite front end structure