[WIP] Algorithm for profiles selection