Completed translate() method