new encode