add priority check