correct data type for key lifetime

Closes #10