attempt encode