implement picture handle function