improve proto parser