Add script to find max. assigned ID.