added defaultState as referred in #125
added defaultState as referred in #125