Change callback to return an integer.