I did so.
( I ( ( did so ) . ) )
(ROOT (S (NP (PRP I)) (VP (VBD did) (ADVP (RB so))) (. .)))
I did what I was told to do.
( I ( ( did ( what ( I ( was ( told ( to do ) ) ) ) ) ) . ) )
(ROOT (S (NP (PRP I)) (VP (VBD did) (SBAR (WHNP (WP what)) (S (NP (PRP I)) (VP (VBD was) (VP (VBN told) (S (VP (TO to) (VP (VB do))))))))) (. .)))