Update Issue 134

setting state and adding debug logs