improve off and on methods