implement substitute and fix step so that it doesnt call step on the output

This is what I have so far. Take a look and make sure you agree and be ready to code at 5pm!