A snip of...few hundred lines....