using priorities