update Akabayashi code