Code written for IEEExtreme6(2012)