correct return types to match protos.