modified to insert and update only 6 images per dog