added get key func