Added functionality for optional parameters