added click event which knows what section was clicked