completed SC code refactor