halfway through python to ruby on max sum path