added priority behaviour