Added option for specifying number of links desired