Modifications to histogram script