adding quit action implementation