Added priority support

Added priority support