added priority handler