Using selection object to know that what node have been chosen and where does it start and end.