Added parameters
Merged code