implementation of quit action