Adding Base Encoder