basic test seems to work after refactor