added priority support