updating click handling to work on any child elements of main item