add some code about managing pictures