added error handling that worked, still need to get images to work