added 2 Selection function (recursive and not recursive)