add code for sws