the structure is ok, apart from the finding of the smallest