added collapse (not working) and some changes