adding a better element click check