Basic construct for the SW-Algorithm