modified daemon and generateUnique