added errors for encoder