Finally got the basic pattern now for the collapse and expand actions