removed global debug variable _sc