updated naming method

It was generating duplicated names in some cases