a script to calculate page rank