add some preconditions