added unique id
refactoring