add preview button
encoding