Refactored to have single f in protobuf