added ws and sql