making directories at start
finished embedding of images