added test_encode program