started implementing the logic for collapsing layers