How to return entered value to a variable?