A model of scientific integrity