Accept KeyPair as argument