part 4 file parsing and random feature generation