Reworked steps 1 and 2 to be a little smarter.