final study code