adding a statistic monitor script + minor changes