adds implementation for quit