added click out of menu functionality