Reading i from terminal