setting waving switch to on initially