cleanup
added hasRank(