added decoding and encoding