added early click detection