math library cleaned
histogram file must be closed after use