add logging to update_ranks