update pic function