encoding 4. input code and pull out