Spike Code added by Akash and Anna