addpicturebox function, and some adjustments