set up confidence detection