Separated  input reading functions.