added support for priority