added encoder test