added decode option