Added support for more parameters
Added unit tests