That gsub method seems better (although more spaces on input should not happen)