updated. and added xxxx to exit from the application