added conflict detection