refactor and linting
make a class of the wxs3 functions