created the encoder module and added a request struct