Small thing, but "var values = [id, rank]" ? Or insert into function below?