Added generic isClicked() function