testing and adding response json and WM state
refactoring