added encoder module