Implemented the initWsa function