fixed working with input