add quit & off pin logic