creates rankupdate funtion
fixes refresh issue