using card order and compare functions from cardtools