added optional param to return full nodes and not just IDs in get_selected