stripping spaces from keys