added synchronization of uinque id creation