review this stuff

Not sure if it's the best code ever written