change in gui from str.encode(a,b) to a.encode(b)