added conflict detection
tweaked the conflict mechanism a little