factored out find-elem, implemented click