changed return type from candidate to image