Moved input action to function & press enter ok