remove decode and encode functions