Added setWithPriority method