rewrote base plugin to get tests to pass - v2.0