big refactoring of WS