Adding HSW toggle function