Using strings was part of the original code, but I've converted them to integers anyway.