replacing depricated translation function