Moved translate to own function