added tests for state