on off buttons functional but incomplete
added some parameters