better proto parsing