sort resources by descending of their priorities
refactor the resource_picker template