fixed a small bug
added card sorting