key passing functionality