add tests for internal state