changed deprecated Console.readLine to io.StdIn.ReadLine