changed to use objectForKey instead of key value