add decode and encode program