Moving global params  to local params

To close the issue #25.