changes to QUIT (the main program).. still testing