Updated spice code