This needs to be more robust. What if the incremented name is taken? See later comment for example.