Tried various changes to figure out why my key keeps coming back undefined. Not able to fix this yet.