save only relevant values in histogram and to the right folder