Add comments for sw algorithm.