added the collapse method for the foldercontroller + tests