Changed scale-free algorithm