Shouldn't you keep the original script working and make a change for your code:

public function getRules($imp = false)

instead of 

public function getRules($imp = true)

And make your code send a true bool with the call of the function?
So the original code isn't broken?

Just my 2 cents