added priority feature