added functionality to upload pic, but pics not rendering correctly