optimizing the protos