implemented minus and count-params functions