Question: i have one questing on what i need some help. I using [Advanced Classifieds & Directory Pro](https://wordpress.org/plugins/advanced-classifieds-and-directory-pro/) plugin for inserting my listings. But plugin is using the same template as my blog template which i have modified a little. So now i want to remove sidebar just from this [listing/post page](http://echographie-sans-frontieres.com/acadp_listings/listing-3/) but to keep in blog page.

i tryed this:

```
.acadp_listings .sidebar .clearfix {display:none;}

```

but seems not remove sidebar just for listing page.. ANy help here?

Answer: 
The cast fails because the list returned by `sortedWith` function is not an instance of `java.util.ArrayList`. 

Moreover it's unsafe to cast it to `MutableList` too, because the implementation of `sortedWith` can be changed later, so that it returns `List` that's no longer a `MutableList`.

If you have a `MutableList` and you want to sort it, you have two options:

* either sort it in-place with the `sortWith` function (not `sortedWith`):

```
cards.sortWith(compareBy{it.face})
// now cards list is sorted

```
* or sort it to a new list and then copy it to a mutable list, if you need to mutate it after

```
cards = cards.sortedWith(compareBy{it.face}).toMutableList()

```
There are easier ways to sort a list in place without creating a new one and assign back to the original. The simplest is `cards.sortBy { it.face }`