Pass additional args to guard function

Implements #74.