added card order and comapre functions to cardtools