Made changes to reading input