Added translate function