Modified the method to permit optional arguments