add spark core code