restructure and added collapse