added encoder thing