Chong's changes to [2]_S code