adding memory and runtime statistics to program1