make quit() more multipurpose