added priority code