implement add key method