adding encoding option