in reply to extracting data
Just wanted to point out a slight typo-ish thing. You left out this condition:
edit: oops, this was supposed to be in response to moritz's helpful comment.