fixed code for SC model