credit rotation function