finished upgrading code samples