adding memory and runtime statistics for program3