added code to fetch pictures from folders