moved histogram initialization to begin run