Removed ambiguous variable 'key'