Added support for optional parameters