rewrote from hw1; start state for step 1