changed collapse handlers to Angular JS