added get state and test methods