Minor gripe - instead of adding the original instruction in the list and then replacing it, you could hold off adding it to the list until the end