made optional arguments actually work