added encoder