Bug fix - collapse component
hw4 - part1 - final version