improve profiles extraction