better discardCards function and a fixed discard