wrote translation back to ruby