corrected wrong String#encode method call