implemented priorities