version with collapsed function and first version of collection view layout without FlowLayout.