quit structure and method rewrite