changing translation code
fixed some bugs