Initial version of choose_nodes/1