edited parse_midi