Adds support to pass a key parameter

Fixes #120