Implemented first part of read_in_file function