Added On and Off functions to class