closer to working sc code export