added encoder and decoder class

encoder decoder functionality added