encoding implemented