fixed collapse issue. sort still not really working