changed pic function