written by chris barnes except where indicated otherwise