click outside implemented and integrated