sparkcore code