changed getname to key