The extendedk-tree algorithm