added code to add image to libary