added programtic click detection