Using new parameter features

New we can simplify the code.