write some code for Input, can extract to Horse/Proxy?