added support for whitespaces on keys