added key function