reverted to doing 1 image at once
changed test code