add some checks.