Tested quit function successfully