making it possible to pass configuration as object or as two separate parameters