Submitted version. Good parser. Correct algorithm.