Effect of flow and temperature distribution on the performance of a PEM fuel cell stack