modify click_pic function