fixed a bug, initial state is now being initialized correctly and the test workls