improve sid generator