updated mswp.c