Adding a second argument to set the maximum number of id to deal with