added missing use statement
allow "params" to be either an array or an object
added example of how to use an object as parameters