finished encoder