Resa spark code