James' code