added some histogram comparing, enhanced simulation