supporting required and optional parameters