changed compare to a _static_ function of Widget