fixing reading input