Added computation to Mirai's code.