Adding support for more parameteres in recursive method.