add -k/--key opt for specifying the key