moved input into a react component