task1d - need to check memory leaks