created Switch class to handle tact switch handling.