add collapse level functionality