added an off function
merged off function