replace space with underscore in key