added function to retrieve data based on node position from last.