refactor to move ws helper metheds