Fixed my keyFunciton