update the picture and implement other function