Decoding and Encodig implemented