Rewrote a more pythonic ssw_wrapper