readLine function works