impliment inputh method's switch