fixed a bug where i should be j, added smearing into histogram