keychain tutorial with library