Code written for ECE110