adding sw helper functions