adding collapse feature