added decode feature.