Rather than having commented code like this it would be way better to have working tests so that we can be sure it works after every commit.