maybe decode instead of encode