Adding code for MMnK queue