changed code in python tutorial, these functions don’t return image