updated unit tests for scm.r