restructured to fit OTP standards