add input restrict and add test internet connect