checks for conflicting ids
refactoring