move hasmethod to utils