add quit app function