encoeaencode function, dev loop, dev variable