refactor existing tests, add test for attaching methods to scope
add tests for invert and invertAll