modified click functionality