histogram added, restructuring files