added support for variadic functions