Added reference ID field and its generation