update TODO: function to compute perron vector