Add function create_images